<%-- 
    Document   : complaintsList
    Created on : Oct 17, 2012, 9:15:38 AM
    Author     : DinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Complaints Detail</title>
            <link rel="stylesheet" type="text/css" href="../styles/style.css" />
        </head>
        <body>        
            <jsp:include page="../includes/incHeader.jsp" flush="false" />
            <h3>Complaints Detail</h3>
            <h:form>
                <h:inputHidden value="#{complaintsBean.complaints.complaintID}"/>
                <h:panelGrid columns="2" style="margin:0 auto">
                    <h:outputText value="Thread Name"/>
                    <h:outputText value="#{complaintsBean.complaints.threadName}"/>

                    <h:outputText value="User Name"/>
                    <h:outputText value="#{complaintsBean.complaints.userName}"/>

                    <h:outputText value="Department Name"/>
                    <h:outputText value="#{complaintsBean.complaints.departmentName}"/>


                    <h:outputText value="Title:"/>
                    <h:outputText value="#{complaintsBean.complaints.title}"/>

                    <h:outputText value="Complaint Content:"/>
                    <h:outputText value="#{complaintsBean.complaints.complaintContent}"/>

                    <h:outputText value="Create Time:"/>
                    <h:outputText value="#{complaintsBean.complaints.createTime}"/>


                    <h:outputText value="Is Finished:"  rendered="#{complaintsBean.complaints.isFinished==true}"/>
                    <h:outputText value="#{complaintsBean.complaints.isFinished}" rendered="#{complaintsBean.complaints.isFinished==true}"/>

                    <h:outputText value="Finished Time:" rendered="#{complaintsBean.complaints.isFinished==true}"/>
                    <h:outputText value="#{complaintsBean.complaints.finishedTime}" rendered="#{complaintsBean.complaints.isFinished==true}"/>

                    <h:outputText value="Has Replied:" rendered="#{complaintsBean.complaints.isFinished==true}"/>
                    <h:outputText value="#{complaintsBean.complaints.hasReplied}" rendered="#{complaintsBean.complaints.isFinished==true}"/>

                    <h:outputText value="User Ref:" rendered="#{complaintsBean.complaints.isFinished==true}"/>
                    <h:outputText value="#{complaintsBean.complaints.userRef}" rendered="#{complaintsBean.complaints.isFinished==true}"/>


                    <h:outputText value="Priority:" rendered="#{complaintsBean.complaints.isFinished==true}"/>
                    <h:outputText value="#{complaintsBean.complaints.priority}" rendered="#{complaintsBean.complaints.isFinished==true}"/>

                    <h:commandButton action="BackToComplaintView" value="Back"/>
                    <h:commandLink value="Answers" action="#{complaintsBean.prepareData4AddAnswers}" rendered="#{complaintsBean.complaints.isFinished==false}">
                        <f:param name="idParam" value="#{complaintsBean.complaints.complaintID}"/>
                    </h:commandLink>
                </h:panelGrid>

                <t:panelTab rendered="#{complaintsBean.answers.answerID>0}">
                    <h3>Answers</h3>
                    <h:panelGrid columns="2" style="margin:0 auto">
                        <h:outputText value="Answer Content:"/>
                        <h:outputText value="#{complaintsBean.answers.answerContent}"/>

                        <h:outputText value="IsEnable:"/>
                        <h:outputText value="#{complaintsBean.answers.isEnable}"/>
                    </h:panelGrid>
                </t:panelTab>
                <center>
                    <h:commandLink value="Edit" action="#{answersBean.prepareData4Update}" rendered="#{login.role == 1 || login.role == 2}">
                        <f:param name="idParam" value="#{complaintsBean.answers.answerID}"/>
                    </h:commandLink>
                </center>

            </h:form>


        </body>
    </html> </f:view>


